<%-- 
    Document   : propuestaviajeexistente
    Created on : 13/01/2011, 03:17:18 PM
    Author     : Ju4nC4rlos
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="js/validar.js"></script>
        <link rel="stylesheet" type="text/css" href="css/calendar.css"/>
        <link href="<s:url value='/styles/style.css'/>" rel="stylesheet" type="text/css" media="all"/>
        <script type="text/javascript" src="js/calendar_us.js"></script>
        <title>TRAVEL STORE - Consulta de Viajes</title>
    </head>
    <body>
        <h3>Viajes de <s:property value="nombre"/>&nbsp;<s:property value="apellido"/></h3>
        <h3>&nbsp;</h3>
        <s:iterator value="viajes" status="rowCounter" >
            <table border="0">
                <tr>
                    <td><h4>&nbsp;&nbsp;Destino&nbsp;&nbsp;</h4></td>
                    <td><h4><s:property value="viajes.get(#rowCounter.index).get(0)"/></h4></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td><h4>&nbsp;&nbsp;fecha inicio&nbsp;&nbsp;</h4></td>
                    <td><h4><s:property value="viajes.get(#rowCounter.index).get(1)"/></h4></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td><h4>&nbsp;&nbsp;fecha fin&nbsp;&nbsp;</h4></td>
                    <td><h4><s:property value="viajes.get(#rowCounter.index).get(2)"/></h4></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td><h4>&nbsp;&nbsp;Hospedaje&nbsp;&nbsp;</h4></td>
                    <td><h4><s:property value="viajes.get(#rowCounter.index).get(3)"/></h4></td>
                    <td>&nbsp;</td>
                </tr>
                <s:if test="viajes.get(#rowCounter.index).get(4)==0">
                    <tr>
                        <td><h4>&nbsp;&nbsp;Tipo de viaje&nbsp;&nbsp;</h4></td>
                        <td><h4>&nbsp;Publico&nbsp;</h4></td>
                        <td>&nbsp;</td>
                    </tr>
                </s:if>
                <s:else>
                    <tr>
                        <td><h4>&nbsp;&nbsp;Tipo de viaje&nbsp;&nbsp;</h4></td>
                        <td><h4>&nbsp;Privado&nbsp;</h4></td>
                        <td>&nbsp;</td>
                    </tr>
                </s:else>
                <tr>
                    <td><h4>&nbsp;&nbsp;Creador&nbsp;&nbsp;</h4></td>
                    <td><h4>&nbsp<s:property value="%{viajes.get(#rowCounter.index).get(6)}"/>&nbsp;<s:property value="%{viajes.get(#rowCounter.index).get(7)}"/>&nbsp;</h4></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td><h4>&nbsp;&nbsp;Correo del Creador&nbsp;&nbsp;</h4></td>
                    <td><h4>&nbsp<s:property value="%{viajes.get(#rowCounter.index).get(8)}"/>&nbsp;</h4></td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td><s:form action="rutas">
                            <s:hidden value="%{viajes.get(#rowCounter.index).get(5)}" name="id" />
                            <s:submit value="Proponer Paradas" align="left"/>
                        </s:form></td>
                    <td><s:form action="votacion">
                            <s:hidden value="%{viajes.get(#rowCounter.index).get(5)}" name="id" />
                            <s:submit value="Votacion de Itineraio" align="left"/>
                        </s:form></td>
                    <td><s:form action="itinerario" theme="css_xhtml">
                            <s:hidden value="%{viajes.get(#rowCounter.index).get(5)}" name="id" />
                            <s:submit value="Itinerario" align="left"/>
                        </s:form></td>
                    <s:if test="nombre==viajes.get(#rowCounter.index).get(6) and apellido==viajes.get(#rowCounter.index).get(7)">
                    <td><s:form action="cerrarviaje">
                            <s:hidden value="%{viajes.get(#rowCounter.index).get(5)}" name="id" />
                            <s:submit value="Cerrar Viaje" align="left"/>
                        </s:form></td>
                    </s:if>
                </tr>
            </table>
            <h3>&nbsp;</h3>
        </s:iterator>

    </body>
</html>
